package com.rabbitmq.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/4/25 22:53
 */
@Component
@RabbitListener(queues = "testDirectQueue")
public class directConsumer {
    @RabbitHandler
    public void direct(Map mapmsg) {
        System.out.println("lixiao接收到消息" + mapmsg.toString());
    }
}